﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Icst.Leaflike.Web;
using Icst.Leaflike.Data;


namespace Icst.Leaflike.Web.search
{
    public partial class _default : pagesearch
    {
        protected TextBox treeHeightTextBox;
        protected Calendar treeSeasonCalendar;
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            AddSelection(treeFormSelector, Tree.SHUXING);
        }
        protected override string OnSave(bool empty)
        {
            SearchQuery[SearchOption.Shugao] = empty?string.Empty: treeHeightTextBox.Text.Trim();
            SearchQuery[SearchOption.Shuxing] = empty ? string.Empty : treeFormSelector.Selected;
            return "search_branch.htm";
        }
        protected override void OnLoad()
        {
            treeHeightTextBox.Text = SearchQuery[SearchOption.Shugao];
            treeFormSelector[SearchQuery[SearchOption.Shuxing]] = true;
        }
    }
}
